package com.wang.conf;

/**
 * @author wcy
 * @date 2022-07-30 15:36
 */
public enum
DevLogEnum {

    dataUpload("0058", "0150", "0001"),
    runLog("0058", "0142", "0900"),
    loginLog("0059", "0140", "0300"),
    operateLog("0059", "0141", "0600"),
    menjinLog("0059", "0144", "1500"),
    operationLog("0059", "0145", "1800"),
    reportLog("0060", "0143", "1200");


   /* 数据上传（0058 0001）
    运行日志（0058 0900）
    登录日志 (0059 0300)
    操作日志（0059 0600）
    门禁日志（0059 1500）
    运维记录（0059 1800）
    报警日志（0060 1200）*/


    private String devLogTypeCode;

    private String myDevEventCode;

    private String sendDevEventCode;


    private DevLogEnum(String devLogTypeCode, String myDevEventCode, String sendDevEventCode) {
        this.devLogTypeCode = devLogTypeCode;
        this.myDevEventCode = myDevEventCode;
        this.sendDevEventCode = sendDevEventCode;
    }


    public String getDevLogTypeCode() {
        return devLogTypeCode;
    }


    public String getMyDevEventCode() {
        return myDevEventCode;
    }


    public String getSendDevEventCode() {
        return sendDevEventCode;
    }


    //获取值
    public static DevLogEnum getBySendDevEventCode(String code) {

        for (DevLogEnum d : DevLogEnum.values()) {
            if (d.getSendDevEventCode().equals(code)) {
                return d;
            }
        }
        return null;
    }


    public static void main(String[] args) {
        DevLogEnum devLogEnum = DevLogEnum.getBySendDevEventCode("0001");


    }


}
